package com.company;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class HJ23删除字符串中出现次数最少的字符 {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line;
        while((line = br.readLine()) != null) {
            int[] array = new int[26];
            for(int i = 0;i < line.length();i++) {
                char ch = line.charAt(i);
                array[ch - 'a']++;
            }
            int min = 20;
            for(int i = 0;i < array.length;i++) {
                if(array[i] > 0 && min > array[i]) {
                    min = array[i];
                }
            }
            StringBuilder sb = new StringBuilder();
            for(int i = 0;i < line.length();i++) {
                char ch = line.charAt(i);
                if(array[ch - 'a'] > 0 && array[ch - 'a'] != min) {
                    sb.append(ch);
                }
            }
            System.out.println(sb.toString());
        }
    }
}
